/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
}

/* 主内容区域样式 */
.main-content {
    background: white;
    border-radius: 20px;
    margin: 30px auto;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
}

/* AI智能诊断样式 */
.ai-diagnosis-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.symptom-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.symptom-input:focus {
    outline: none;
    border-color: #667eea;
}

.quick-symptoms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.symptom-btn {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.symptom-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.ai-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 诊断结果样式 */
.diagnosis-result {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    display: none;
}

.diagnosis-summary {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.severity-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.severity-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.severity-low { background: #d4edda; color: #155724; }
.severity-medium { background: #fff3cd; color: #856404; }
.severity-high { background: #f8d7da; color: #721c24; }

.possible-conditions {
    margin: 20px 0;
}

.condition-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.condition-name {
    font-weight: 600;
}

.condition-probability {
    color: #667eea;
    font-weight: 600;
}

.recommendations {
    margin: 20px 0;
}

.recommendation-item {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.general-advice {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2196f3;
}

.disclaimer {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 20px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 医护端样式 */

/* 工作台统计卡片 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.stat-content p {
    color: #666;
    margin: 5px 0 0 0;
}

/* 图表容器 */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.chart-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

/* 患者管理样式 */
.patient-filters {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.patient-filters input,
.patient-filters select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

.patient-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#patients-table {
    width: 100%;
    border-collapse: collapse;
}

#patients-table th,
#patients-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#patients-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

#patients-table tr:hover {
    background: #f8f9fa;
}

.btn-small {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-small:hover {
    background: #0056b3;
}

.btn-small.btn-danger {
    background: #dc3545;
}

.btn-small.btn-danger:hover {
    background: #c82333;
}

/* 数据导入样式 */
.import-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.import-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    transition: border-color 0.3s ease;
}

.file-upload-area:hover {
    border-color: #007bff;
}

.upload-placeholder {
    cursor: pointer;
}

.upload-placeholder i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.upload-preview {
    text-align: center;
}

.upload-preview i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.import-template {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.import-results {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.import-success {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #28a745;
    font-weight: 600;
}

.import-errors {
    margin-top: 15px;
    padding: 15px;
    background: #f8d7da;
    border-radius: 6px;
    color: #721c24;
}

.import-errors ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

/* 诊断审核样式 */
.review-list {
    margin: 30px 0;
}

.review-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.review-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.ai-diagnosis,
.doctor-review {
    padding: 15px;
    border-radius: 8px;
}

.ai-diagnosis {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.doctor-review {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

.review-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-success { background: #28a745; }
.btn-warning { background: #ffc107; color: #333; }
.btn-danger { background: #dc3545; }

.btn-success:hover { background: #218838; }
.btn-warning:hover { background: #e0a800; }
.btn-danger:hover { background: #c82333; }

/* 医生中心样式 */
.doctor-profile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.profile-card,
.settings-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 消息样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: #28a745;
}

.message-error {
    background: #dc3545;
}

.message-info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 底部导航样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-btn.active {
    color: #007bff;
}

.nav-btn i {
    font-size: 20px;
    margin-bottom: 5px;
}

.nav-btn span {
    font-size: 12px;
}

/* 多页面导航样式 */
.page-navigation {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-link.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.page-link.secondary:hover {
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
        margin: 20px auto;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .import-container {
        grid-template-columns: 1fr;
    }
    
    .doctor-profile {
        grid-template-columns: 1fr;
    }
    
    .review-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .quick-symptoms {
        grid-template-columns: repeat(2, 1fr);
    }
}